<div class="container-fluid setting-main">
    <div class="col-md-3 col-md-offset-2">
        <div class="panel panel-primary" id="userInfo">
            <div class="panel-heading text-center">
                个人信息
            </div>
            <div class="panel-body text-center">
                <img ng-src="{{user.avatar}}" width="50" height="50" /><br /> <br />
                <div class="text-left">
                    <p>昵称：<span ng-bind="user.name"></span></p>
                    <p>邮箱：<span ng-bind="user.email"></span></p>
                </div>
            </div>
        </div>
    </div>
    <div class="col-md-5" >
        <div class="panel panel-default" id="avotor">
            <div class="panel-heading">
                修改头像
            </div>
            <div class="panel-body text-center">
                <div class="col-sm-4">
                    当前头像<br />
                    <img ng-src="{{user.avatar}}" width="50" height="50" /><br /><br />
                </div>
                <div class="col-sm-4">
                    上传预览<br />
                    <img ng-show="avatar[0].dataUrl != null" ng-src="{{avatar[0].dataUrl}}" class="thumb" width="50" height="50" />
                </div>

                <div style="clear: both;"></div>

                <div ng-file-drop ng-file-select ng-file-change="generateThumb(avatar[0])"
                     ng-model="avatar" class="drop-box"
                     drag-over-class="dragover" ng-multiple="false" allow-dir="false"
                     accept="image/*">
                    点击选择图片或拖放图片到此处上传<br />
                    <small>注：图片最大不能超过200kb.</small>
                </div>

                <div ng-no-file-drop>当前浏览器不支持拖拽上传</div>

                <button class="btn btn-default btn-sm" ng-click="updateAvatar(avatar)">上传</button>
            </div>
        </div>
        <div class="panel panel-default" id="mail">
            <div class="panel-heading">
                修改邮箱
            </div>
            <div class="panel-body">
               <form role="form" class="form-horizontal validate-form">
                   <div class="form-group">
                       <label for="oldEmail" class="col-sm-2 control-label">原邮箱：</label>
                       <div class="col-sm-10">
                           <input type="email" class="form-control" id="oldEmail" input-valid email ng-model="oldEmail" placeholder="请确认您的原邮箱">
                       </div>
                   </div>
                   <div class="form-group">
                       <label for="newEmail" class="col-sm-2 control-label">
                           新邮箱：
                       </label>
                       <div class="col-sm-10">
                           <input type="email" class="form-control" id="newEmail" input-valid email ng-model="newEmail" placeholder="输入您新的邮箱">
                       </div>
                   </div>
                   <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                            <a ng-click="updateEmail(oldEmail, newEmail)" class="btn btn-default btn-sm">修改</a>
                        </div>
                   </div>
               </form>
            </div>
        </div>
        <div class="panel panel-default" id="pwd">
            <div class="panel-heading">
                修改密码
            </div>
            <div class="panel-body">
                <form role="form" class="form-horizontal validate-form">
                    <div class="form-group">
                        <label for="oldPwd" class="col-sm-2 control-label">原密码：</label>
                        <div class="col-sm-10">
                            <input type="password" class="form-control" input-valid pwd id="oldPwd" ng-model="oldpwd" placeholder="请确认您的原密码">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="newPwd" class="col-sm-2 control-label">
                            新密码：
                        </label>
                        <div class="col-sm-10">
                            <input type="password" class="form-control" input-valid pwd id="newPwd" ng-model="newpwd" placeholder="输入您新的密码，6到16个字符，可以是下划线、字母和数字">
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                            <a ng-click="updatePwd(oldpwd, newpwd)" class="btn btn-default btn-sm">修改</a>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

